import request from '@/utils/request'

// 查询贷款申请列表
export function listLoan(query) {
  return request({
    url: '/request/loan/list',
    method: 'get',
    params: query
  })
}

// 查询贷款申请详细
export function getLoan(id) {
  return request({
    url: '/request/loan/' + id,
    method: 'get'
  })
}

// 新增贷款申请
export function addLoan(data) {
  return request({
    url: '/request/loan',
    method: 'post',
    data: data
  })
}

// 修改贷款申请
export function updateLoan(data) {
  return request({
    url: '/request/loan',
    method: 'put',
    data: data
  })
}

// 删除贷款申请
export function delLoan(id) {
  return request({
    url: '/request/loan/' + id,
    method: 'delete'
  })
}
